package com.inwavetech.os.tests.sync.util;

import com.inwavetech.os.util.SyncDateFormat;

import java.text.ParseException;
import java.util.Date;

/**
 * Created by jgskin on 3/9/14.
 */
public class DateHandler {

    private SyncDateFormat dateFormatter;
    private String dateStr;
    private Date date;

    public DateHandler() throws ParseException {
        dateFormatter =  new SyncDateFormat();
        dateStr = getDateFormatter().format(new Date());
        date = getDateFormatter().parse(dateStr);
    }

    public SyncDateFormat getDateFormatter() {
        return dateFormatter;
    }

    public String getDateStr() {
        return dateStr;
    }

    public Date getDate() throws ParseException {
        return date;
    }

}
